package com.applet.controller;

import com.applet.Base.BaseController;
import com.applet.annotation.SystemControllerLog;
import com.applet.entity.request.VerificationCodeSmsRequest;
import com.applet.service.SmsService;
import com.applet.utils.AppletResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/sms")
public class SmsController extends BaseController {

    @Autowired
    private SmsService smsService;

    @SystemControllerLog(funcionExplain = "发送短信信息")
    @PostMapping(value = "/sendSms")
    public AppletResult sendSms(@RequestBody VerificationCodeSmsRequest sendSmsRequest){
        return smsService.sendVerificationCodeSms(sendSmsRequest);
    }
}
